﻿@model IEnumerable<CNav.Domain.Admin.DataSource>

@{
    ViewBag.Title = "Data Source";
}
<div>
    <table id="box-table-a">
        <tr>
            <th style="width: 200px;">Data name
            </th>
            <th>Action
            </th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink(item.Name, "Data" , "DataValue", new { id = item.ID }, null)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                    @Html.ActionLink("Add Data", "Create", "DataValue", new { id = item.ID }, null) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.ID })
                </td>
            </tr>
        }
    </table>

    <ol>
        <li class="liCentre">
                        <input type="button" value="Create New" id="createNew" />
        </li>
    </ol>
</div>

<script type="text/javascript">
    $(document).ready(function () {

        var cc = new CaseCentre();
        cc.BindButton("#createNew", '@Url.Content("~/DataSource/Create")');
    });
</script>
